package com.zhentao.service;

import com.zhentao.dao.UserDao;
import com.zhentao.pojo.Users;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserImpI implements UserService{
    //调用持久层
    @Autowired
    private UserDao dao;

    @Override
    public Users findByName(String username) {
        return dao.selectUserByUsername(username);
    }

    @Override
    public void save(Users users) {
        dao.insert(users);
    }
}
